#ifndef _KEY_H
#define _KEY_H

#include <rtthread.h>
#include <rtdevice.h>
#include <board.h>

#define PIN_KEY1                2       //PC13
#define PIN_KEY2                4       //PC15

#define PIN_DOOR_CLOSE          38      //PA15

#define PIN_LIMIT_UP            39      //PB3
#define PIN_LIMIT_DOWN          40      //PB4


#define KEY1                    (rt_pin_read(PIN_KEY1)?0:1)
#define KEY2                    (rt_pin_read(PIN_KEY2)?0:1)

#define LIMIT_UP                rt_pin_read(PIN_LIMIT_UP)
#define LIMIT_DOWN              rt_pin_read(PIN_LIMIT_DOWN)
#define DOOR_CLOSE              rt_pin_read(PIN_DOOR_CLOSE)




void key_init(void);



#endif
